package com.github.shiqiyue.app.modules.dbms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.shiqiyue.app.modules.dbms.entity.UserQuery;
import com.github.shiqiyue.app.modules.dbms.mapper.UserQueryMapper;
import com.github.shiqiyue.app.modules.dbms.service.IUserQueryService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户查询记录 服务实现类
 * </p>
 *
 * @author wenyao.wu
 * @since 2019-08-06
 */
@Service
public class UserQueryServiceImpl extends ServiceImpl<UserQueryMapper, UserQuery> implements IUserQueryService {

    @Override
    public void addRecord(Long databseId, Long userId, String sql) {
        UserQuery userQuery = new UserQuery();
        userQuery.setDatabaseId(databseId);
        userQuery.setUserId(userId);
        userQuery.setData(sql);
        this.save(userQuery);
    }
}
